package main
import(
	"fmt"
)
func main(){
	var a float64
	var b float64
	var operation string
	fmt.Println("输入算式，空格隔开")
	fmt.Scanf("%f %v %f",&a,&operation,&b)
	cal(a,operation,b)
	
}
// 四则运算
func cal(a float64,operation string,b float64) float64 {
	var c float64
	switch operation {
		case "+":
			c = a + b
			break
		case "-":
			c = a - b
			break
		case "×":
			c = a * b
			break
		case "÷":
			c = a / b
			break
		default:
			fmt.Println("错误的运算符");
			return 0
	}
	fmt.Printf("%f %v %f = %f",a,operation,b,c)
	return c
}